package com.sl.au.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.sl.au.entity.Option;

import org.hibernate.annotations.Cascade;

@Entity
@Table(name = "sl_au_user")
public class User extends Root {

	@Column
	private String name;
	@Column
	private String sex;
	/**
	 * 职务
	 */
	@Column(name="sPosition")
	private String position;
	/**
	 * 岗位
	 */
	@ManyToOne	
	@JoinColumn(name="sPost",nullable = true)
	private Option post;
	/**
	 * 人员顺序号
	 */
	@Column(name="sOrderNum")
	private String orderNum;
	
	/**
	 * 人员电话
	 */
	@Column(name="sContactType")
	private String contactType;
	/**
	 * 用户层级
	 */
	@ManyToOne 
	@JoinColumn(nullable = true)
	private BussinessLevel userLevel;//用户层级

	public BussinessLevel getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(BussinessLevel userLevel) {
		this.userLevel = userLevel;
	}

	/**
	 * 人员邮箱
	 */
	@Column(name="sEmail")
	private String email;
	
	/**界面中使用，是否选中**/
	@Transient
	private Boolean isSelected;
	
	public Boolean getIsSelected() {
		return isSelected;
	}

	public void setIsSelected(Boolean isSelected) {
		this.isSelected = isSelected;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}





	public Option getPost() {
		return post;
	}

	public void setPost(Option post) {
		this.post = post;
	}

	public String getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(String orderNum) {
		this.orderNum = orderNum;
	}

	public String getContactType() {
		return contactType;
	}

	public void setContactType(String contactType) {
		this.contactType = contactType;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	
}
